LinearGauge for ASP.NET Web Forms
Resizing the Control
Task-Based Help > Resizing the Control

You can easily change the height and width on the C1LinearGauge by setting the Height and Width properties. By default the height of the control is set to 80px and the width of the control is set to 600px. You can easily change the control's height and width in Source view, from the Properties window, or in code.

In Source View

In Source view add Height="100px" and Width="500px" in the <cc1:C1LinearGauge> tag to the size you wish to set the control's height and width to, for example:

To write code in Source View

<cc1:C1LinearGauge
ID="C1LinearGauge1" runat="server" Height="100px"
Width="500px">

The above will resize the control to 100 pixels tall and 500 pixels wide.

From the Properties Window
You can change the Height and Width properties to set the control's height and width in the Properties window:

  1. Click on the C1LinearGauge to select it.
  2. Navigate to the Properties window and if needed expand the Layout node to locate the Height and Width properties.
  3. Next to Height, enter a value for the size you want the control's height to be, for example "200px".
  4. Next to Width, enter a value for the size you want the control's width to be, for example "500px".
  5. Press the ENTER key or click outside of the Properties window for the height and width you set to be applied to the C1LinearGauge control.

In Code
Add the following code to the Page_Load event to set the Height and Width properties 100 pixels tall and 500 pixels wide:

To write the code in Visual Basic:

Visual Basic
Copy Code
Me.C1LinearGauge1.Height = 100
Me.C1LinearGauge1.Width = 500

To write the code in C#:

C#
Copy Code
this.C1LinearGauge1.Height = 100;
this.C1LinearGauge1.Width = 500;
See Also